﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ReceivablesReport.Export.aspx.cs"
    Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <style type="text/css">
        .thheader{
        font-weight:bold;vertical-align:middle;text-align:center;
        font-size:11px;
        border:1px solid #ccc !important;
        line-height: 7px !important;;
        }
        .totalamount{
        font-weight:bold;
        }
    </style>
    <style type="text/css">
        html {
                font-size: 100%;
                height: 100%;
                margin-bottom: 1px; /* Always show a scrollbar to avoid jumping when the scrollbar appears  */
                }

        body {
                font-family: Arial, Helvetica, sans-serif;
                color: #555;
                background: #fff;
                font-size: 12px;
                }
        a        { color: #57a000; text-decoration: none; }
        a:hover     { color: #000; }
        a:active     { color: #777; }
        a:focus     { outline: 1px; }
        table{border-collapse:collaspe;border:1px solid #fff;border-bottom:1px solid #fff;border-right:1px solid #fff;border-left:1px solid #fff;}
        td {border-collapse: collapse;border:1px solid #fff;border-bottom:1px solid #fff;border-right:1px solid #fff;border-left:1px solid #fff;}
        .normal {border-collapse: collapse;border:1px solid #fff;}
        table.adminlistprint {
            background-color: #fff;
            border-collapse: collapse;
            border-left: 1px solid #CCCCCC;
            border-top: 1px solid #CCCCCC;
            border-right: 1px solid #CCCCCC;
            border-bottom: 1px solid #CCCCCC;
            color: #666666;
            font-size: 12px;
            width: 100%;
        }
        table.adminlistprint td, table.adminlistprint th {
            padding: 3px !important;
            background-color: #fff;
        }
        table.adminlistprint td, table.adminlistprint th  {
            border-bottom: 1px solid #CCCCCC;
            border-right: 1px solid #CCCCCC;
            border-left: 1px solid #CCCCCC;
        }
        table.adminlistprint thead, table.adminlistprint th {
            padding: 3px !important;
            background-color: #ECECEC;
        }
        @media screen, projection{
	    span.pseudolink
	    {
		    color:Blue;
		    text-decoration:underline;
		    font-size:10pt;
		    font-family:Tahoma;
		    cursor:hand
	    }
        header, footer
        {
	        display:none
        }

        @media print{
	        span.pseudolink
	        {
		        display:none
	        }
	        header, footer
	        {
		        display:none
	        }
        }
        .hideifnoscript {
	        display: none
        }
        .wrapword{
        white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
        white-space: -pre-wrap;      /* Opera 4-6 */
        white-space: -o-pre-wrap;    /* Opera 7 */
        white-space: pre-wrap;       /* css-3 */
        word-wrap: break-word;       /* Internet Explorer 5.5+ */
        word-break: break-all;
        white-space: normal;


        }
         .bottom td
        {
         font-weight:bold;
         text-align:left;
        }
        .red
        {
            color:Red !important;
        }     
    </style>
</head>
<body>
    <div id="body-wrapper">
        <div id="header">
        </div>
        <div id="main-content1">
            <h2>
                BÁO CÁO PHẢI THU KHÁCH HÀNG: <% =Province%>
            </h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmEdit" runat="server">
                    <div class="content-box-header" style="height: auto;">
                        <asp:Repeater ID="rptData" runat="server">
                            <ItemTemplate>
                                <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'"
                                    receivablesreport='<%#Eval("ID") %>'>
                                    <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                    </td>
                                    <td editable="false" width="150px;">
                                        <%# DataBinder.Eval(Container.DataItem, "Customer")%>
                                    </td>
                                    <td editable="false" code="FileNumber" style="width: 50px; text-align: center;">
                                        <%# DataBinder.Eval(Container.DataItem, "FileNumber")%>
                                    </td>
                                    <td editable="false" code="ETD">
                                        <%# DataBinder.Eval(Container.DataItem, "ETD")%>
                                    </td>
                                    <td editable="false" code="TotalSellInvoice">
                                        <%# DataBinder.Eval(Container.DataItem, "TotalSellInvoice")%>
                                    </td>
                                    <td editable="true" code="Receivables_Obtained" style="width: 100px;">
                                        <%# DataBinder.Eval(Container.DataItem, "Receivables_Obtained")%>
                                    </td>
                                    <td editable="false" code="Receivables_Must_Obtained">
                                        <%# DataBinder.Eval(Container.DataItem, "Receivables_Must_Obtained")%>
                                    </td>
                                    <td editable="false" code="TotalComCustomer">
                                        <%# DataBinder.Eval(Container.DataItem, "TotalComCustomer")%>
                                    </td>
                                    <td editable="false" code="TotalTaxCustomer">
                                        <%# DataBinder.Eval(Container.DataItem, "TotalTaxCustomer")%>
                                    </td>
                                    <td editable="false" code="ComAfterTax">
                                        <%# DataBinder.Eval(Container.DataItem, "ComAfterTax")%>
                                    </td>
                                    <td editable="true" code="Receivables_Paid_Com" style="width: 100px;">
                                        <%# DataBinder.Eval(Container.DataItem, "Receivables_Paid_Com")%>
                                    </td>
                                    <td editable="false" code="Receivables_Must_Paid_Com" class='<%#double.Parse(Eval("Receivables_Must_Paid_Com").ToString())<0?" red":" " %>'>
                                        <%#double.Parse(Eval("Receivables_Must_Paid_Com").ToString())!=0?double.Parse(Eval("Receivables_Must_Paid_Com").ToString()).ToString("#,#"):""%>
                                    </td>
                                    <td editable="false" code="Date_Expiration">
                                        <%# DataBinder.Eval(Container.DataItem, "Date_Expiration")%>
                                    </td>
                                    <td editable="true" code="Receivables_Update">
                                        <%# DataBinder.Eval(Container.DataItem, "Receivables_Update")%>
                                    </td>
                                    <td editable="true" code="Receivables_PaymentMethod">
                                        <%# DataBinder.Eval(Container.DataItem, "Receivables_PaymentMethod")%>
                                    </td>
                                    <td editable="false" code="Days_Overdue" style="width: 50px; text-align: center;">
                                        <%# DataBinder.Eval(Container.DataItem, "Days_Overdue")%>
                                    </td>
                                    <td editable="false" code="Agent">
                                        <%# DataBinder.Eval(Container.DataItem, "Agent")%>
                                    </td>
                                    <td editable="false" code="PaidStatus">
                                        <%# DataBinder.Eval(Container.DataItem, "PaidStatus")%>
                                    </td>
                                    <td editable="true" code="Receivables_Note" style="width: 100px;">
                                        <%# DataBinder.Eval(Container.DataItem, "Receivables_Note")%>
                                    </td>                                   
                                </tr>
                            </ItemTemplate>
                            <HeaderTemplate>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlistprint"
                                    editcellcontent="true">
                                    <thead>
                                        <tr style="background: #ECECEC;">
                                            <th align="center" rowspan="2">
                                                STT
                                            </th>
                                            <th align="center" colspan="3">
                                                Chi tiết
                                            </th>
                                            <th align="center" colspan="3">
                                                Số phải thu khách hàng
                                            </th>
                                            <th align="center" colspan="5">
                                                Thanh toán COM & Thu lại thuế của Khách hàng
                                            </th>
                                            <th align="center" rowspan="2">
                                                Ngày trả
                                            </th>
                                            <th align="center" rowspan="2">
                                                Ngày TT
                                            </th>
                                            <th align="center" rowspan="2">
                                                HTTT
                                            </th>
                                            <th align="center" rowspan="2">
                                                Số ngày quá hạn
                                            </th>
                                            <th align="center" colspan="2">
                                                Nhà cung cấp
                                            </th>
                                            <th align="center" rowspan="2">
                                                Ghi chú
                                            </th>                                           
                                        </tr>
                                        <tr style="background: #ECECEC;">
                                            <th align="center">
                                                Khách hàng
                                            </th>
                                            <th align="center">
                                                Số File
                                            </th>
                                            <th align="center">
                                                ETD
                                            </th>
                                            <th align="center">
                                                Số tiền phải thu
                                            </th>
                                            <th align="center">
                                                Số tiền đã thu
                                            </th>
                                            <th align="center">
                                                Số tiền còn phải thu
                                            </th>
                                            <th align="center">
                                                COM. Khách hàng
                                            </th>
                                            <th align="center">
                                                Thuế thu lại
                                            </th>
                                            <th align="center">
                                                COM. sau thuế
                                            </th>
                                            <th align="center">
                                                COM đã TT
                                            </th>
                                            <th align="center">
                                                COM còn phải trả
                                            </th>
                                            <th align="center">
                                                Tên
                                            </th>
                                            <th align="center">
                                                Paid
                                            </th>
                                        </tr>
                                    </thead>
                            </HeaderTemplate>
                            <FooterTemplate>
                                <tr class="bottom">
                                    <td colspan="2">
                                    </td>
                                    <td colspan="2">
                                        Tổng cộng</td>
                                    <td>
                                        <% =SUM_Ref_Receivables_Must_Obtained %>
                                    </td>
                                    <td>
                                        <% =SUM_Receivables_Obtained %>
                                    </td>
                                    <td>
                                        <%=SUM_Receivables_Must_Obtained %>
                                    </td>
                                    <td>
                                        <%=SUM_Ref_Receivables_Must_Paid_Com %>
                                    </td>
                                    <td>
                                        <%=SUM_Receivables_Tax_Customer %>
                                    </td>
                                    <td>
                                        <%=SUM_ComAfterTax %>
                                    </td>
                                    <td>
                                        <%=SUM_Receivables_Paid_Com %>
                                    </td>
                                    <td>
                                        <%=SUM_Receivables_Must_Paid_Com %>
                                    </td>
                                    <td>
                                    </td>
                                    <td colspan="9">
                                    </td>
                                </tr>
                                </TABLE>
                            </FooterTemplate>
                        </asp:Repeater>
                        <div class="clear">
                        </div>
                        <div id="footer">
                            <%=strPager%>
                        </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
